Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- DDRD |= (1<<PD0)|(1<<PD1);
- DDRB = 1;
- DDRC |= (1<<PC4)|(1<<PC5);
- InitUSART();
- i2c_init();
- sei();
- unsigned char line[16];
- unsigned char index;
- index=0;
- while(1)
- {
- while (serial_available())
- {
- line[index++]= serial_read();
- USART_Send(line[index]);
- }
- index=0;
- _delay_ms(5000);
- }
- return 0;
- }
- ISR(USART_RXC_vect)
- {
- rxb[rxc]=UDR;
- rxc+=1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement